-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add wrapper for GitHub Actions #437
Conversation
Our test bed is a bit broken right now and I should fix this up, but I just want to see how the GitHub Action test runs for the time being 😬
Once we add a debug option, I'll also update this line to reflect that!
This way our logs look a little cleaner!
So interesting thing I discovered in this test run: https://github.com/kanadgupta/metrotransit-nextrip-oas/runs/5163683403?check_suite_focus=true#step:3:18 Even though this will look a bit messier in the user's action logs, this is the only way to ensure that the command runs in the user's GitHub repo :sad:
Marking this as ready for review! I've ticketed a bunch of tasks (see RM-1944's subtasks) that are still required for this (may happen in separate PRs), but I wanted to get feedback on this approach before I move forward with those. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Been following the dev of this and hell yeah, amazing job, looks good to me, and hell yeah lets deprecate that sync workflow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
damn, that with: rdme
usage is so clean…
Gonna merge this in and do additional work in separate PRs! See RM-1944 for details. |
🧰 Changes
This finally does what we've been talking about for months and adds an extremely lightweight wrapper around this repo so we can have first-class support for GitHub Actions 🚀
You can check out
action.yml
for all the heavy lifting.Here's how uploading an OpenAPI file looks with
npx
vs. the GitHub Action:And here's what it looks like with the old GitHub Action:
I think I prefer the
npx
notation to be honest, but there are a few benefits of this new wrapper we've created:run: npx
commands in your GitHub workflow files, unless they listrdme
in their dev-deps)rdme
as a first-class GitHub Actions integration, rather than a workaround, meaning we can...[redacted]
once and for all 🚮🧬 QA & Testing
I added a little workflow file for testing this GitHub Action integration and it works as expected. It checks out the
oas-examples
repo, checks out the current branch ofrdme
, and runs ourvalidate
andopenapi
commands against apetstore.json
OAS file in a GitHub Action environment ✨ this should be comprehensive enough for our purposes, but I'm open to other ideas here!Additionally, we now specify the
User-Agent
header based on the environment, so I added tests for that (and consolidated logic and improved tests for that code) in this PR.You're welcome to try this out in a separate repo (see here for how I did it)... but if all tests pass then we should be good to go!
Fixes RM-3566